/* ==================================================================   
 * Created [2009-4-27 下午11:32:55] by Jon.King 
 * ==================================================================  
 * TSS 
 * ================================================================== 
 * mailTo:jinpujun@hotmail.com
 * Copyright (c) Jon.King, 2009-2012 
 * ================================================================== 
*/

package com.jinhe.tss.core.cachepool.threadpool;

import com.jinhe.tss.core.cachepool.Cacheable;
import com.jinhe.tss.core.cachepool.ICacheLoader;
import com.jinhe.tss.core.cachepool.TestCacheConstants;
import com.jinhe.tss.core.cachepool.TimeWrapper;
import com.jinhe.tss.core.cachepool.extend.assignment.AssignmentFactory;
import com.jinhe.tss.core.cachepool.extend.assignment.IAssignment;

/** 
 * <p> AssignmentCacheLoader.java </p> 
 * 
 */
public class PortScannerCacheLoader implements ICacheLoader {

    public Cacheable reloadCacheObject(Cacheable item) {
        IAssignment assign = AssignmentFactory.getInstance().create(TestCacheConstants.SCANNER_CLASS);
        return new TimeWrapper(item.getKey(), assign, new Long(item.getCyclelife()));
    }
    
}

